﻿<db:BidirectionalDial x:Class="Codeplex.Dashboarding.Knob360"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:db="clr-namespace:Codeplex.Dashboarding"
    Width="160" Height="160">
    <Grid x:Name="LayoutRoot" >
        <Grid.Resources>
            <Storyboard x:Name="_moveGrab" x:Key="_moveGrab">
                <DoubleAnimationUsingKeyFrames  BeginTime="00:00:00" Storyboard.TargetName="_grabCanvas" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                    <SplineDoubleKeyFrame KeyTime="00:00:0.75" x:Name="_grabPos" Value="302.715"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard  x:Name="_swipe" x:Key="_swipe" >
                <DoubleAnimationUsingKeyFrames  BeginTime="00:00:00" Storyboard.TargetName="_needle" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                    <SplineDoubleKeyFrame KeyTime="00:00:0.75" x:Name="_needlePos" Value="156.446"/>
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </Grid.Resources>
        <Canvas Margin="2.156,2.875,-2.156,-2.875" x:Name="canvas">



            <Canvas Width="160.417" Height="164.167" Canvas.Left="1.852" Canvas.Top="-0.614" >


                <Ellipse x:Name="_background" Stroke="#FF000000" Fill="#FF080808" Height="160" Width="160" />
                <Rectangle Fill="#FFF5F0F0" Height="60.834" x:Name="_needle" Width="6.5" Canvas.Left="75.312" Canvas.Top="19.602" RenderTransformOrigin="0.506,1">
                    <Rectangle.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform/>
                            <SkewTransform/>
                            <RotateTransform Angle="-149.646"/>
                            <TranslateTransform/>
                        </TransformGroup>
                    </Rectangle.RenderTransform>
                </Rectangle>


                <Ellipse Width="106.584" Height="106.166" Canvas.Left="24.96" Canvas.Top="27.046" x:Name="_spinnerBase">
                    <Ellipse.Fill>
                        <LinearGradientBrush EndPoint="0.711,0.962" StartPoint="0.227,0.07">
                            <GradientStop x:Name="_colourRangeStart" Color="#FF100F0F" Offset="0"/>
                            <GradientStop x:Name="_colourRangeEnd" Color="#FF5E5E5E" Offset="1"/>
                        </LinearGradientBrush>
                    </Ellipse.Fill>
                </Ellipse>


                <Path Stretch="Fill" Data="M152.5,76 C152.5,96.39447 112.62733,78.363838 75.472977,78.80822 C36.66341,79.2724 0.5,97.303032 0.5,76 C0.5,34.302502 34.52636,0.5 76.5,0.5 C118.47364,0.5 152.5,34.302502 152.5,76 z" Opacity="0.4" Height="80" Width="154" Canvas.Left="2.812" Canvas.Top="3.115" >
                    <Path.Fill>
                        <RadialGradientBrush GradientOrigin="1.005,1.129">
                            <RadialGradientBrush.RelativeTransform>
                                <TransformGroup>
                                    <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="2.403" ScaleY="2.403"/>
                                    <SkewTransform CenterX="0.5" CenterY="0.5" AngleX="10.48"/>
                                    <RotateTransform CenterX="0.5" CenterY="0.5"/>
                                    <TranslateTransform X="-0.159"/>
                                </TransformGroup>
                            </RadialGradientBrush.RelativeTransform>
                            <GradientStop Color="#FFFFFFFF"/>
                            <GradientStop Color="#4CFFFFFF" Offset="1"/>
                        </RadialGradientBrush>
                    </Path.Fill>
                </Path>


            </Canvas>

            <TextBlock x:Name="_txt0" Width="30.127" Height="19" Canvas.Left="33.734" Canvas.Top="128" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" FontFamily="Verdana" Foreground="#FFF2ECEC" Text="0000" TextAlignment="Center" ><TextBlock.RenderTransform>
      <TransformGroup>
        <ScaleTransform ScaleX="1" ScaleY="1"/>
        <SkewTransform AngleX="0" AngleY="0"/>
        <RotateTransform Angle="210"/>
        <TranslateTransform X="0" Y="0"/>
      </TransformGroup>
    </TextBlock.RenderTransform></TextBlock>

            <TextBlock x:Name="_txt1" Width="30.382" Height="19" Canvas.Left="10.382" Canvas.Top="106.015" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" FontFamily="Verdana" Foreground="#FFF2ECEC" Text="0000" TextAlignment="Center" ><TextBlock.RenderTransform>
      <TransformGroup>
        <ScaleTransform ScaleX="1" ScaleY="1"/>
        <SkewTransform AngleX="0" AngleY="0"/>
        <RotateTransform Angle="240"/>
        <TranslateTransform X="0" Y="0"/>
      </TransformGroup>
    </TextBlock.RenderTransform></TextBlock>

            <TextBlock  x:Name="_txt2" Width="35.666" Height="19" Canvas.Left="-2.657" Canvas.Top="73.807" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" FontFamily="Verdana" Foreground="#FFF2ECEC" Text="0000" TextAlignment="Center" ><TextBlock.RenderTransform>
      <TransformGroup>
        <ScaleTransform ScaleX="1" ScaleY="1"/>
        <SkewTransform AngleX="0" AngleY="0"/>
        <RotateTransform Angle="270"/>
        <TranslateTransform X="0" Y="0"/>
      </TransformGroup>
    </TextBlock.RenderTransform></TextBlock>

            <TextBlock Width="33.814"  x:Name="_txt3" Height="19" Canvas.Left="6.645" Canvas.Top="38.558" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" FontFamily="Verdana" Foreground="#FFF2ECEC" Text="0000" ><TextBlock.RenderTransform>
      <TransformGroup>
        <ScaleTransform ScaleX="1" ScaleY="1"/>
        <SkewTransform AngleX="0" AngleY="0"/>
        <RotateTransform Angle="300"/>
        <TranslateTransform X="0" Y="0"/>
      </TransformGroup>
    </TextBlock.RenderTransform></TextBlock>

            <TextBlock Width="35.034" Height="19"  x:Name="_txt4" Canvas.Left="26.996" Canvas.Top="16.217" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" FontFamily="Verdana" Foreground="#FFF2ECEC" Text="0000" TextAlignment="Center" ><TextBlock.RenderTransform>
      <TransformGroup>
        <ScaleTransform ScaleX="1" ScaleY="1"/>
        <SkewTransform AngleX="0" AngleY="0"/>
        <RotateTransform Angle="330"/>
        <TranslateTransform X="0" Y="0"/>
      </TransformGroup>
    </TextBlock.RenderTransform></TextBlock>

            <TextBlock Width="31.333" Height="19"  x:Name="_txt5" Canvas.Left="62.235" Canvas.Top="5.645" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" FontFamily="Verdana" Foreground="#FFF2ECEC" Text="0000" TextAlignment="Center" ><TextBlock.RenderTransform>
      <TransformGroup>
        <ScaleTransform ScaleX="1" ScaleY="1"/>
        <SkewTransform AngleX="0" AngleY="0"/>
        <RotateTransform Angle="0"/>
        <TranslateTransform X="0" Y="0"/>
      </TransformGroup>
    </TextBlock.RenderTransform></TextBlock>

            <TextBlock Width="31.248" Height="19"  x:Name="_txt6" Canvas.Left="94.061" Canvas.Top="13.256" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" FontFamily="Verdana" Foreground="#FFF2ECEC" Text="0000" TextAlignment="Center" ><TextBlock.RenderTransform>
      <TransformGroup>
        <ScaleTransform ScaleX="1" ScaleY="1"/>
        <SkewTransform AngleX="0" AngleY="0"/>
        <RotateTransform Angle="30"/>
        <TranslateTransform X="0" Y="0"/>
      </TransformGroup>
    </TextBlock.RenderTransform></TextBlock>

            <TextBlock Width="28.594" Height="19"  x:Name="_txt7" Canvas.Left="119.591" Canvas.Top="34.481" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" FontFamily="Verdana" Foreground="#FFF2ECEC" Text="0000" TextAlignment="Center" ><TextBlock.RenderTransform>
      <TransformGroup>
        <ScaleTransform ScaleX="1" ScaleY="1"/>
        <SkewTransform AngleX="0" AngleY="0"/>
        <RotateTransform Angle="60"/>
        <TranslateTransform X="0" Y="0"/>
      </TransformGroup>
    </TextBlock.RenderTransform></TextBlock>

            <TextBlock Width="37.998" Height="19" Canvas.Left="125.708"  x:Name="_txt8" Canvas.Top="67.855" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" FontFamily="Verdana" Foreground="#FFF2ECEC" Text="0000" TextAlignment="Center" ><TextBlock.RenderTransform>
      <TransformGroup>
        <ScaleTransform ScaleX="1" ScaleY="1"/>
        <SkewTransform AngleX="0" AngleY="0"/>
        <RotateTransform Angle="90"/>
        <TranslateTransform X="0" Y="0"/>
      </TransformGroup>
    </TextBlock.RenderTransform></TextBlock>


            <TextBlock Width="36.704" Height="19" Canvas.Left="119.195" x:Name="_txt9" Canvas.Top="101.012" TextWrapping="Wrap" RenderTransformOrigin="0.584,0.586" FontFamily="Verdana" Foreground="#FFF2ECEC" Text="0000" TextAlignment="Center" ><TextBlock.RenderTransform>
      <TransformGroup>
        <ScaleTransform ScaleX="1" ScaleY="1"/>
        <SkewTransform AngleX="0" AngleY="0"/>
        <RotateTransform Angle="120"/>
        <TranslateTransform X="-5.787" Y="0.075"/>
      </TransformGroup>
    </TextBlock.RenderTransform></TextBlock>

            <TextBlock Width="46.516" Height="19" Canvas.Left="90.157" Canvas.Top="123.793"  x:Name="_txt10" TextWrapping="Wrap" RenderTransformOrigin="0.584,0.586" FontFamily="Verdana" Foreground="#FFF2ECEC" Text="0000" TextAlignment="Center" ><TextBlock.RenderTransform>
      <TransformGroup>
        <ScaleTransform ScaleX="1" ScaleY="1"/>
        <SkewTransform AngleX="0" AngleY="0"/>
        <RotateTransform Angle="150"/>
        <TranslateTransform X="-5.787" Y="0.075"/>
      </TransformGroup>
    </TextBlock.RenderTransform></TextBlock>


            <TextBlock Width="106.167" Height="13.083" Canvas.Left="26.75" Canvas.Top="71.333" Text="000" TextWrapping="Wrap" FontFamily="Verdana" x:Name="_txt11" Foreground="#FFF2ECEC" TextAlignment="Center"/>

        </Canvas>
        <Canvas Height="28" HorizontalAlignment="Left" Margin="46,0,0,32" x:Name="_grabCanvas" VerticalAlignment="Bottom" Width="28" RenderTransformOrigin="1.285,-0.608">
            <Canvas.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform Angle="-3.922"/>
                    <TranslateTransform X="0.322" Y="-0.567"/>
                </TransformGroup>
            </Canvas.RenderTransform>
            <Ellipse Fill="#FFA5A0A0" Height="20" HorizontalAlignment="Center" x:Name="_indicator" VerticalAlignment="Center" Width="20" Canvas.Left="4" Canvas.Top="4" RenderTransformOrigin="1.3,-1.3">
           
                <Ellipse.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </Ellipse.RenderTransform>
            </Ellipse>
            <Ellipse IsHitTestVisible="False" Height="14" Width="14" Canvas.Left="7" Canvas.Top="7">
                <Ellipse.Fill>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FF5E5D5D"/>
                        <GradientStop Color="#FFDEDBDB" Offset="1"/>
                    </LinearGradientBrush>
                </Ellipse.Fill>
            </Ellipse>

            <Ellipse IsHitTestVisible="False" Height="28" Fill="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="28" x:Name="_grabHighlight"/>

        </Canvas>
    </Grid>

</db:BidirectionalDial>
